<div class="box">
	<div class="top login">
		<div class="top_inside">
			<?= $this->translate('Login Form'); ?>
		</div><!-- class top_inside -->
	</div>
	<div class="body">
    <?php if ( !$this->user ) { ?>
        <p>
        	<small><?= $this->translate('loginHelp') ?></small>
    	   <?= $this->form; ?>
    	</p>
    	<div class="divider"></div>
        <?php if ( isset($this->loginResult) ) { ?>
            <p>
            <?php foreach( $this->loginResult->getMessages() as $message ) { ?>
    			<?= $message ?><br/>
        	<?php } ?>
    	    </p>
            <div class="divider"></div>
        <?php } ?>
        <p> 	
    	   <a href="<?= $this->url(array("controller"=>"user","action"=>"register")) ?>" title="<?= $this->translate('Register') ?>"><?= $this->translate('Register') ?></a>
    	</p>
    <?php } else { ?>
        <p>
    	   <?= $this->user->username ?><br/>	
    	</p>
    	<div class="divider"></div>
    	<p>
    	    <a class="basket" href="<?=$this->url(array("controller"=>"user-basket","action"=>"items-list"))?>" title="<?=$this->translate('Basket')?>"><?=$this->translate('Basket')?></a><br />
    	    <a class="orders" href="<?=$this->url(array("controller"=>"orders","action"=>"user-orders"))?>" title="<?=$this->translate('Orders')?>"><?=$this->translate('Orders')?></a><br />
            <a class="settings" href="<?=$this->url(array("controller"=>"user","action"=>"settings"))?>" title="<?=$this->translate('Settings')?>"><?=$this->translate('Settings')?></a><br/>
            <a class="logout" href="<?=$this->url(array("controller"=>"user","action"=>"logout"))?>" title="<?=$this->translate('Logout')?>"><?=$this->translate('Logout')?></a><br/>            	
        </p>
	<?php } ?>
				
	</div>
</div>